package cn.lanqiao.mapper;

import cn.lanqiao.pojo.Users;
import org.apache.ibatis.annotations.Many;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.junit.jupiter.api.Order;

import java.util.List;
import java.util.Set;

public interface UserMapper {
    @Select({"select * from users where uid=#{uid}"})
    @Results(value = {@Result(id=true,column = "uid",property = "uid"),
    @Result(column = "username",property = "username"),
    @Result(column = "password", property = "password"),
    @Result(column = "birthday",property = "birthday")})
    /*@Result(property = "ordersSet", column = "uid",javaType = Set.class,many = @Many(select="cn.lanqiao.mapper.OrderMapper.selectOrderAndUserByOid"))})*/
    public Users selectUserByUid(Integer uid);
}
